﻿using System;
using System.Transactions;

using YhmOA.IDAL;
using YhmOA.Model;
using YhmOA.Common;
using System.Collections.Generic;

namespace YhmOA.BLL
{
    public static class Integrated_Car_DicBLL
    {
        private static ITDal<Integrated_Car_Dic> GetTDal()
        {
            return DataProvider.GetGEFDal<ITDal<Integrated_Car_Dic>>();
        }

        /// <summary>
        /// 取得行车记录中的去向和行车路线
        /// </summary>
        /// <returns></returns>
        public static List<Integrated_Car_Dic> GetDirectionList()
        {
            int directioncount = 0;
            return GetTDal().GetList("table=\"Integrated_Car_TravelRecord\" and field=\"Direction\"", 0, 0, "", out directioncount);
        }

        /// <summary>
        /// 取得违章记录中的违章代码和违章内容
        /// </summary>
        /// <returns></returns>
        public static List<Integrated_Car_Dic> GetViolatedCodeList()
        {
            int count = 0;
            return GetTDal().GetList("table=\"Integrated_Car_ViolatedRecord\" and field=\"ViolatedCode\"", 0, 0, "", out count);
        }

        /// <summary>
        /// 取得违章记录中的处理部门
        /// </summary>
        /// <returns></returns>
        public static List<Integrated_Car_Dic> GetPenalizeDepartList()
        {
            int count = 0;
            return GetTDal().GetList("table=\"Integrated_Car_ViolatedRecord\" and field=\"PenalizeDepart\"", 0, 0, "", out count);
        }

        /// <summary>
        /// 取得加油卡充值记录中的刷卡的卡号
        /// </summary>
        /// <returns></returns>
        public static List<Integrated_Car_Dic> GetBankNoList()
        {
            int count = 0;
            return GetTDal().GetList("table=\"Integrated_Car_OilCardRecord\" and field=\"BankNo\"", 0, 0, "", out count);
        }
    }
}
